<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>

<div id="test1" contenteditable="true">foobar</div>

<script>
description("Test using id in execCommand(InsertHorizontalRule)");

var s = window.getSelection();
var e = document.getElementById("test1");
s.collapse(e, 0);

var id = "hr";
document.execCommand("InsertHorizontalRule", false, id);
var hr = document.getElementById(id);

shouldBeNonNull('hr');
</script>
</body>
</html>
